import { ApiProperty } from '@nestjs/swagger';
import {
  EActionLogActionEnum,
  EActionLogTypeEnum,
} from '../entities/action-log.entity';

export class RecordActionLogDto {
  @ApiProperty({
    description: '操作类型',
    enum: EActionLogActionEnum,
    example: 'use',
  })
  action: EActionLogActionEnum;

  @ApiProperty({
    description: '数据类型',
    example: 'Template',
    enum: EActionLogTypeEnum,
  })
  type: EActionLogTypeEnum;

  @ApiProperty({
    description: '数据名/组件名',
    required: false,
  })
  name: string;

  @ApiProperty({
    description: '数据描述',
    required: false,
  })
  description: string;

  @ApiProperty({
    description: '数据/组件内容',
    example: '',
    required: false,
  })
  content: string;

  @ApiProperty({
    description: 'Template, Kit 关联的id',
    example: 1,
    required: false,
  })
  relevancyId: number;
}
